<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 比较</title>
</head>
<body>
<h2>!=  不相等</h2>
<p>把 5 赋值给 x，然后显示比较 (x != 8) 的值：</p>

<p id="demo"></p>

<script>
  var x=5;
  document.getElementById("demo").innerHTML=(x!=8);  //true

</script>
</body>
</html>